<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box">
        <input type="text" v-model="value">{{value}}
        <br>
        <button @click="say">转大写</button>
    </div>

    <script src="./js/vue.js"></script>
    <script>
        let box = new Vue({
            el: "#box",
            data: {
                value: "",
            },
            methods: {
                say() {
                    console.log(this.value);
                    this.value = this.value.toUpperCase();
                }
            }
        })
    </script>
</body>

</html>